package org.jsets.fastboot.database;

import org.jsets.fastboot.util.StringUtils;

/**
 * 
 * SQL语句类型
 * @author wj596
 *
 */
public enum StatementType {

	INSERT(1), DELETE(2), UPDATE(3), SELECT(4);

	private final Integer value;

	StatementType(Integer value) {
		this.value = value;
	}

	public Integer getValue() {
		return value;
	}

	public static StatementType of(String val) {
		if (StringUtils.notEmpty(val)) {
			return StatementType.valueOf(val);
		}
		return null;
	}

	public static Integer getValue(String val) {
		if (StringUtils.notEmpty(val)) {
			return StatementType.valueOf(val).getValue();
		}
		return null;
	}

}